<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>列表渲染</title>
    <script src="vue.js"></script>
</head>
<body>
<div id="app">
    <div>
        <ul>
            <li v-for="(item,index) of list">{{item}}-{{index}}</li>
        </ul>
    </div>
    <div v-for="(item,key,index) of userInfo">
        {{item}} --- {{key}} ---{{index}}
    </div>
</div>
<script>
    //vue.set 添加对象数据
    // Vue.set(vm.userInfo,"address","beijing")
    //vm.$set(vm.userInfo,"address","beijing");

    //Vue.set 改变数组
    //Vue.set(vm.list,1,5);
    //vm.$set(vm.list,1,5);
    var vm = new Vue({
        el:"#app",
        data:{
            list:[
                1,2,3,4,5
            ],
            userInfo:{
                name:"lee",
                age:25,
            }
        },
        methods:{}
    });
</script>
</body>
</html>